<?php
/**
 * Created by Zhy
 * User: Zhy
 * Date: 2023/12/13
 * Time: 15:51
 */

namespace app\api\model;

class Xl extends Base
{
    /**
     * 系列||型号列表
     * @param $where
     * @return bool|\PDOStatement|string|\think\Collection
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    static function selectXl($where = [], $field = '*'){
        return self::where($where)->field($field)->order('device_time desc')->select();
    }

    /**
     * 系列||型号单条
     * @param $where
     * @param $field
     * @return array|bool|\PDOStatement|string|\think\Model|null
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    static function findXl($where = [], $field = '*'){
        return self::where($where)->field($field)->find();
    }
}